import { WorkflowBase } from "../../core";
import { ImageExtNode } from "../genPosterWork/nodes/imageExtNode";
import { EditImgNode } from "./nodes/editImgNode";
import { IdentifyImgObjectNode } from "./nodes/identifyImageObjectNode";
import { IdentifyImgBgColorNode } from "./nodes/identifyImgBgColorNode";
import { ImageListExtNode } from "./nodes/imageListExtNode";

export class ImageEditorGraph extends WorkflowBase {
    WorkflowID: string = "ImageEditorGraph";
    WorkflowVars;

    protected _EditImgNode = new EditImgNode();
    protected _identifyImgBgColorNode = new IdentifyImgBgColorNode();
    protected _identifyImgObjectNode = new IdentifyImgObjectNode();
    protected _ImageListExtNode = new ImageListExtNode();
    protected InitNode(): void {
        this._StartNode.isGenTitle = false;
        this.AddNode(this._EditImgNode);
        this.AddNode(this._identifyImgBgColorNode);
        this.AddNode(this._identifyImgObjectNode);
        this.AddNode(this._ImageListExtNode);
    }
    protected InitEdge(): void {
        this.AddEdge(this._StartNode, this._identifyImgBgColorNode);

        this.AddEdge(this._identifyImgBgColorNode, this._identifyImgObjectNode);
        this.AddEdge(this._identifyImgBgColorNode, this._ImageListExtNode);
        this.AddEdge(this._identifyImgObjectNode, this._EditImgNode);
        this.AddEdge(this._ImageListExtNode, this._EditImgNode);
        this.AddEdge(this._EditImgNode, this._EndNode);
    }

}